import request from '@/utils/request'
import { unionApiUrl } from '@/api/config'

/**
 * 获取列表
 */
export function getActivityList(data) {
    return request({
        url: unionApiUrl + '/partyActivity/getPagePartyActivity',
        method: 'post',
        data
    })
}

/**
 * 获取活动详情
 */
export function getActivityDetail(params) {
    return request({
        url: unionApiUrl + '/partyActivity/getPartyActivityById',
        method: 'get',
        params
    })
}

/**
 * 
 * 获取活动附件
 */
export function getACtivityFiles(data) {
    return request({
        url: unionApiUrl + '/partyActivityFile/getPagePartyActivityFile',
        method: 'post',
        data
    })
}

/**
 * 新增活动
 */
export function addActivity(data) {
    return request({
        url: unionApiUrl + '/partyActivity/insertSelective',
        method: 'post',
        data
    })
}

/**
 * 编辑活动
 */
export function editActivity(data) {
    return request({
        url: unionApiUrl + '/partyActivity/updateByPrimaryKeySelective',
        method: 'post',
        data
    })
}

/**
 * 删除活动
 */
export function deleteActivity(params) {
    return request({
        url: unionApiUrl + '/partyActivity/deleteByPrimaryKey',
        method: 'post',
        params
    })
}
